<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=<?=$this->config->item('charset');?>">
	<title><?=$caipu_info['title'];?>的做法_正宗<?=$caipu_info['title'];?>怎么做_<?=$this->config->item('site_name');?></title>
	<meta name="keywords" content="<?=$caipu_info['title'];?>,<?=$caipu_info['title'];?>怎样做才好吃,<?=$caipu_info['title'];?>懒人做法,<?=$caipu_info['title'];?>的正宗做法" />
	<meta name="description" content="正宗<?=$caipu_info['title'];?>怎么做,<?=$caipu_info['title'];?>少盐更健康,<?=$caipu_info['title'];?>食材用料,<?php if($caipu_info['infos']){echo my_string_filter($caipu_info['infos']);}?>" />
	<meta name="mobile-agent" content="format=html5;url=http://m.ichufang.cn/recipe/<?=$caipu_info['id']?>">
	<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
	<link href="<?=base_url('static/css/global.css')?>" rel="stylesheet" type="text/css" media="screen">
	<link href="<?=base_url('static/css/recipe.css')?>" rel="stylesheet" type="text/css" media="screen">
	<script src="<?=path_res('static/js/jquery.js')?>"></script>
	<script src="<?=path_res('static/js/jquery.lazyload.js')?>"></script>
	<script src="<?=path_res('static/js/jquery-ui.min.js')?>"></script>
	<script src="<?=path_res('static/js/functions.js')?>"></script>
	<script>
    $(document).ready(function(){
        $("#listtyle1_list img").lazyload({
        placeholder : "<?=base_url('static/img/loading.gif')?>",
        effect : "fadeIn"
        });
    });
    </script>
<script>
var cpro_id = 'u1488672';
</script>
<script src="http://cpro.baidustatic.com/cpro/ui/i.js"></script>
</head>
<body>

<? $this->load->view('header'); ?>

<div id="main" class="clearfix">

	<div class="nav_line">
		<li><a href="<?=base_url()?>">首页</a></li>
		<li>&gt;</li>
		<li><a href="<?=site_url('caipu')?>">菜谱大全</a></li>
		<li>&gt;</li>
		<li><?=$caipu_info['title']?></li>
	</div>
	<div class="cp_header clearfix">
		<div class="cp_img">
			<img alt="<?=$caipu_info['title']?>的做法" src="<?=$caipu_info['coverImage']?>">
		</div>
		<div class="cp_info">
			<div class="info1">	
				<h1 uid="<?=$caipu_info['authorid']?>"><?=$caipu_info['title']?></h1>

				<span class="cpmore">
					<div class="user">
						<a target="_blank" href="<?=site_url('u/'.$caipu_info['authorid'])?>" title="<?=$caipu_info['author']?>" class="img"><img src="<?=$caipu_info['user_avartar']?>" alt="<?=$caipu_info['author']?>"></a>
						<div class="info">
							<a id="guanzhu<?=$caipu_info['authorid']?>" class="<?php if ($caipu_info['is_guanzhu'] ) {echo 'careyed';}else{echo 'careadd';}?> guanzhu" userid="<?=$caipu_info['authorid']?>" href="javascript:void(0)"><?php if ($caipu_info['is_guanzhu']) {echo '已关注';}else{echo '关注';}?></a>
						</div>
					</div>
				</span>

				<dl class="tags clearfix">
					<?php if ($caipu_info['class_name']) :?>
						<?php foreach($caipu_info['class_name'] as $rs) :?>
							<dt><a href="<?=site_url('caipu/'.$rs)?>"><?=$rs?></a></dt>
						<?php endforeach;?>
					<?php else: ?>
						<dt><a href="<?=site_url('caipu')?>">家常菜</a></dt>
			        <?php endif; ?>
				</dl>
			</div>

			<div class="info2">
				<strong>
					该菜创建于 <?=date('Y-m-d', $caipu_info['time'])?>&nbsp;&nbsp;
					烹饪时间：<a href="####" title="<?=$caipu_info['title']?>的烹饪时间">&lt;<?=$caipu_info['costtime']?></a>&nbsp;&nbsp;
					菜量 <a href="####" title="<?=$caipu_info['title']?>的人数"> <?=$caipu_info['deal']?>人份</a>
				</strong>
			</div>
			<div class="info3">
				<div class="bdsharebuttonbox">
					<a href="#" class="bds_more" data-cmd="more"></a>
					<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
					<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
					<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
					<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a>
					<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
				</div>
				<script>
					window._bd_share_config={
						"common":{
							"bdSnsKey":{},
							"bdText":"#菜谱#<?php if($caipu_info['infos']){echo cutstr(strtoupper(preg_replace("/\s+/", " ", $caipu_info['infos'])),90);}else{echo $caipu_info['title'];}?> 做法，技巧>>>（分享自 @爱厨房美食网）",
							"bdMini":"2",
							"bdMiniList":false,
							"bdPic":"<?=base_url($caipu_info['coverImage'])?>",
							"bdStyle":"1",
							"bdSize":"32"
						},
						"share":{

						}
					};
					with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
				</script>
			</div>
			<div class="info4">
				<input type="hidden" id="shoucangValue" name="shouCangValue" value="<?=$caipu_info['is_caipu_fav']?>">
				<a id="shoucangInfo" href="javascript:void(0);" data-id="<?=$caipu_info['id']?>" title="<?=$caipu_info['title']?>的做法" class="<?php if ($caipu_info['is_caipu_fav'] == 1){ echo 'btnysc';}else{ echo 'btnsc';}?> addanniu"><?php if ($caipu_info['is_caipu_fav'] == 1){ echo '已';}?>收藏</a>
				<a href="javascript:void(0);" title="<?=$caipu_info['title']?>的做法" class="addanniu color1 btncd" id="">加入菜单</a>
				<a href="javascript:void(0);" title="<?=$caipu_info['title']?>的二维码" class="addanniu color1" id="erweima_t">手机查看</a>
				<a href="<?=site_url('recipe/'.$caipu_info['id'].'/print')?>" title="打印 <?=$caipu_info['title']?>" class="addanniu color1" target="_blank">打印菜谱</a>
				<a href="<?=site_url('search/caipu/'.UrlEncode($caipu_info['title']))?>" title="<?=$caipu_info['title']?>的其他做法" class="addanniu color1" target="_blank">其他做法</a>
				<a href="<?=site_url('video/index?kw='.UrlEncode($caipu_info['title']))?>" title="<?=$caipu_info['title']?>的视频做法" class="addanniu color1" target="_blank">视频做法</a>
				
				<div class="ewmbox" id="ewmbox">
					<div class="c">
						<strong>用手机查看这篇菜谱</strong>
						<p>手机扫描右侧二维码，<br>将这篇菜谱带进厨房，让您边做边看！</p>
					</div>
					<img src="<?=site_url('ajax/qr_code/caipu/'.$caipu_info['id'])?>" class="ewmimg">
				</div>

				<div id="caidan" class="menuco inshnop mtm pl25 hidden">
					<p class="pv15">选择你需要添加的菜单：</p>
					<div class="aabmenu pv15 mbm r3">
						<ul class="menuzi pll">

						</ul>
						<p class="pll ptm"><a href="javascript:void(0);" class="createCaiDan">创建一个新菜单</a></p>							
					</div>
					<div class="bubox pbl pts">
						<button type="button" onclick="addHasCaidan();" class="btnpl">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" onclick="disHidden(1);">取消</a>
					</div>
					<a href="javascript:void(0)" class="scengx ocx"></a>
				</div>
				<div id="newcaidan" class="menuco inshnop mtm pl25 hidden">
					<p class="pv15">创建一个新菜单：</p>
					<div class="aabmenu pv15 mbm">
						<span class="pll mb10 dblok"><input type="text" id="caidanTitle" class="dmily r3" name="caidanTitle" onfocus="if(this.value==this.defaultValue) {this.value='';}" onblur="if(!this.value) {this.value=this.defaultValue;}" value="菜单标题(必填)" /></span>
						<span class="pll"><textarea class="ddmeext r3" id="caidanjieshao" name="caidanjieshao" onfocus="if(this.value==this.defaultValue) {this.value='';}" onblur="if(!this.value) {this.value=this.defaultValue;}">菜单介绍</textarea></span>													
					</div>						
					<div class="bubox pbl pts">
						<button type="button" onclick="addSaveCaidan();" class="btnpl">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" onclick="disHidden(2)">取消</a>
					</div>
					<a href="javascript:void(0)" class="scengx ocx"></a>
				</div>



			</div>
		</div>
	</div>


	<div style="width: 990px;position: relative;" class="clearfix">


		<div class="releft">
			<div class="materials">
				<?php if($caipu_info['infos']):?>
				<p><strong>“</strong><?=$caipu_info['infos']?><strong>”</strong></p>
				<?php endif;?>
				<strong class="cpc_h2"><a href="javascript:void(0);" title="<?=$caipu_info['title']?>的食材">食材</a></strong>
						<div class="materials_box">
		
							<div class="fuliao clearfix">
								<ul class="clearfix">
									<?php $index = 0;?>
									<?php foreach( $caipu_info['materials'] as $materials_list) :?>
									<?php $index++;?>
										<?php $materials = explode('，',$materials_list);?>
										<?php $scname = my_string_filter(@$materials[0]);?>
										<?php $scnames .= my_string_filter(@$materials[0]).',';?>
										<li class="<?php if ($index%2==0) {echo 'br0';}?>">
											<h4><a target="_blank" title="<?=$scname?>的做法大全" href="<?=site_url('search/caipu/'.addslashes($scname))?>"><?=$scname?></a></h4><em><?=@$materials[1]?></em>
											
											<span><a href="javascript:void(0);" class="scinfo" onmouseover="pop_shicai_on(this, '<?=$scname?>', 'text');" onmouseout="pop_shicai_out();">常识</a></span></li>
									<?php endforeach?>
								</ul>
							</div>
																		
						</div>
			</div>

			<div class="measure">
				<h2 class="cpc_h2"><?=$caipu_info['title']?>的做法</h2>
				<div class="edit" data-plugin="keyword">
					<?php $index = 0;?>
					<?php foreach( $caipu_info['setpInfos'] as $setpInfos) :?>
					<?php if($setpInfos != ''):?>
					<dd>
						<em><?=$index+1?>.</em>
						<p><?=$setpInfos?></p>
						<?php if (@$caipu_info['setpimage'][$index]['location']):?><img alt="" src="<?=@$caipu_info['setpimage'][$index]['location']?>"><?php endif?>
						<?php $index++;?>
					</dd>
					<?php endif?>
					<?php endforeach?>
				

					<?php if($caipu_info['tips']):?>
					<h2 class="cpc_h2"><?=$caipu_info['title']?>的技巧</h2>
					<p style="width: 630px;margin-bottom: 10px;"><?=$caipu_info['tips']?></p>
					<?php endif;?>
				</div>

				<span class="authors_copy_right">
					<strong>
						<?php if ($caipu_info['authorid'] > 1):?>
							该菜谱制作方法归作者所有，没有作者本人的书面许可任何人不得转载。
						<?php else:?>
							该菜谱来源于网络，制作方法归作者所有，如果您是作者请通过以下方式联系本站认领或删除。
						<?php endif;?>
					</strong>
					<a target="_blank" title="打印<?=$caipu_info['title']?>" href="<?=site_url('recipe/'.$caipu_info['id'].'/print')?>">打印菜谱</a>
				</span>
				<div style="width:640px;padding:0px 15px 20px;background:#f5f5f5;overflow:hidden;">
					<script type="text/javascript">
					    /*菜谱页内容下640*60，创建于2014-6-13*/
					    var cpro_id = "u1587020";
					</script>
					<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
				</div>
			</div>


			<div class="cp_comment" id="comment">
				<h2 class="cpc_h2"><?=$caipu_info['title']?>的讨论</h2>

					<div class="cp_comments_list">
						<div id="SOHUCS"></div>
						<script>
						  (function(){
						    var appid = 'cyrGlnl2w',
						    conf = 'prod_c3e21e0ce90bcdc5faed7a4421cc8dd6';
						    var doc = document,
						    s = doc.createElement('script'),
						    h = doc.getElementsByTagName('head')[0] || doc.head || doc.documentElement;
						    s.type = 'text/javascript';
						    s.charset = 'utf-8';
						    s.src =  'http://assets.changyan.sohu.com/upload/changyan.js?conf='+ conf +'&appid=' + appid;
						    h.insertBefore(s,h.firstChild);
						    window.SCS_NO_IFRAME = true;
						  })()
						</script> 
				</div>
			</div>

		</div>

		<div class="reright">
			<div class="clearfix" style="overflow:hidden;margin-bottom:10px;">
				<a href="http://www.jingxisd.com" target="_blank"><img src="<?=base_url('static/img/myad.jpg')?>" alt="" width="300"></a>
			</div>

			<div class="clearfix" style="overflow:hidden;margin-bottom:10px;">
				<iframe src="<?=site_url('tb_scshop?names='.$scnames)?>" width="300" height="330" frameborder="0" scrolling="no"></iframe>
			</div>
			<div class="clearfix" style="overflow:hidden;margin-bottom:10px;">
				<script type="text/javascript">
				/*菜谱内容页 300*250，创建于2014-3-14*/
				var cpro_id = "u1488672";
				</script>
				<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
			</div>
			<div class="bjmenu clearfix" style="margin-bottom:10px;">
				<h2>厨房知识</h2>
				<ul>
				<?php foreach ($article_list as $article) :?>
					<li><a href="<?=site_url('article/views/'.$article['id'].'')?>" target="_blank" title="<?=$article['title']?>"><?=$article['title']?></a></li>
				<?php endforeach;?>
				</ul>
			</div>

			<!--div class="favper mb10 clearfix">
				<h3 class="mb10">他们收藏了这个菜谱</h3>
				<?php foreach ($caipu_info['fav_user'] as $fuser) :?>
					<a href="<?=site_url('u/'.$fuser['uid'])?>" rel="nofollow" target="_blank" title="<?=$fuser['uid']?>"><img alt="<?=$fuser['uid']?>" src="<?=$this->user_login->get_avatar_dir($fuser['uid']);?>"></a>
				<?php endforeach; ?>
			</div-->
	      
	        <div id="fixedad" style="width: 300px;height: 250px;position: relative;top: 0px;bottom: 0px;background-position: initial initial;background-repeat: initial initial;}">
	        	<a data-type="3" data-tmpl="300x250" data-tmplid="126" data-rd="2" data-style="2" data-border="1" href="#"></a>
			</div>
		</div>
	</div>
	<div class="bbtitles" id="con_xscp">看过<?=$caipu_info['title']?>的人还喜欢看...</div>
	<div class="listtyle2_w clearfix">
		<div id="listtyle1_list" class="listtyle1_list clearfix">
			<?php $xgcpi=0;?>
			<?php foreach($caipu_info['caipu_related_list'] as $related):?>
				<?php if ($caipu_info['id'] != $related['id']) :?>
				<?php $xgcpi++;?>
				<div class="listtyle1 <?php if($xgcpi==1){echo 'ml0';}?>">
				<div class="big">
				<a target="_blank" href="<?=site_url('recipe/'.$related['id'].'')?>" title="<?=$related['title']?>">
				<img class="img" alt="<?=$related['title']?>" src="<?=$related['coverImage']?>"></a>
				<div class="i_w">
				<div class="i" style="margin-top: 0px;">
				<div class="c1">
					<strong><?=cutstr($related['title'],9,'')?></strong>
					<span>制作需要 <?=$related['costtime']?>分左右</span>
		            <em><?=$related['author']?></em>
				</div>
				</div></div>
				</div>
				</div>
				<?php endif; ?>
			<?php endforeach; ?>
		</div>

		<div class="bbtitles" id="con_xscp2">作者的其他菜谱...</div>
		<div class="listtyle2_w clearfix">
			<div id="listtyle1_list" class="listtyle1_list clearfix">
				<?php $xgcpi=0;?>
				<?php foreach($caipu_info['caipu_list_by_uid'] as $caipulist):?>
					<?php if ($caipu_info['id'] != $caipulist['id']) :?>
					<?php $xgcpi++;?>
					<div class="listtyle1 <?php if($xgcpi==1){echo 'ml0';}?>">
					<div class="big">
					<a target="_blank" href="<?=site_url('recipe/'.$caipulist['id'].'')?>" title="<?=$caipulist['title']?>">
					<img class="img" alt="<?=$caipulist['title']?>" src="<?=$caipulist['coverImage']?>"></a>
					<div class="i_w">
					<div class="i" style="margin-top: 0px;">
					<div class="c1">
						<strong><?=cutstr($caipulist['title'],9,'')?></strong>
						<span>制作需要 <?=$caipulist['costtime']?>分左右</span>
			            <em><?=$caipulist['author']?></em>
					</div>
					</div></div>
					</div>
					</div>
					<?php endif; ?>
				<?php endforeach; ?>
			</div>
		</div>
	</div>
</div>

<div class="shicaipop" id="shicaipop"></div>
<script type="text/javascript">
$(function(){
	var h1 = $("#fixedad").offset().top;
	var h2;
	var eh = $("#fixedad").height();
	var h4 =($("#con_xscp").length > 0 && $("#con_xscp").offset().top) || $("#con_xscp2").offset().top;
	$(window).scroll(function(){
		h2 = $(window).scrollTop();
		var h3 = h1-h2;
		if(h3<0){
			if((h4-h2)>eh){
				$("#fixedad").css({"position":"fixed","top":"0px"});
			}else if((h4-h2)<eh){
				$("#fixedad").css({"position":"absolute","top":"auto","bottom":"0px"});
			}
		}else if(h3>0){
			$("#fixedad").css({"position":"relative","top":"0px"});
		}
	});
});

(function(win,doc){ 
	var s = doc.createElement("script"), h = doc.getElementsByTagName("head")[0]; 
		if (!win.alimamatk_show) { 
			s.charset = "gbk"; 
			s.async = true; 
			s.src = "http://a.alimama.cn/tkapi.js"; 
			h.insertBefore(s, h.firstChild); 
		}; 
	var o = { 
		pid: "mm_14776594_9156499_30858576",/*推广单元ID，用于区分不同的推广渠道*/ 
		appkey: "",/*通过TOP平台申请的appkey，设置后引导成交会关联appkey*/ 
		unid: "",/*自定义统计字段*/
		plugins:[{name:"keyword"}] 
	}; 
	win.alimamatk_onload = win.alimamatk_onload || []; 
	win.alimamatk_onload.push(o); 
})(window,document);
</script>
<script src="<?=path_res('static/js/caipuinfo.js')?>"></script>
<script src="<?=path_res('static/js/comment.js')?>"></script>
<script src="<?=path_res('static/js/likeandshare.js')?>"></script>
<script src="<?=path_res('static/js/taginfo.js')?>"></script>
<? $this->load->view('footer'); ?>